/*******************************************************************************
 * This file is part of blueprint4j www.blueprint4j.org.
 * 
 *     blueprint4j is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU Lesser General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 * 
 *     blueprint4j is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU Lesser General Public License for more details.
 * 
 *     You should have received a copy of the GNU Lesser General Public License
 *     along with blueprint4j. If not, see <http://www.gnu.org/licenses/>.
 ******************************************************************************/
package blueprint4j.utils;

import java.util.*;
import java.io.Serializable;
import java.io.*;
import java.sql.*;

public class VectorUniqueString implements Serializable {
	private Vector store = new Vector();
	
	public VectorUniqueString() {}
	
	public VectorUniqueString(String value[]) {
		for (int i =0;i < value.length;i++) {
			add(value[i]);
		}
	}
	
	public void add(String p_value) {
		String value= p_value; 
		for (int i = 1;store.contains(value);i++) {
			value = p_value + " "+i;
		}
		store.add(value);
	} 
	
	public String get(int index) {
		return (String) store.get(index);
	}
	
	public int size() {return store.size();}
	
	public boolean contains(String value) {return store.contains(value);}

}

